#include "LaserActivateCommand.h"

LaserActivateCommand::LaserActivateCommand(Laser* receiver, const bool& enableLaser): laser(receiver), enabled(enableLaser)
{
}

LaserActivateCommand::LaserActivateCommand(const LaserActivateCommand& rhs): GameCommand(rhs), laser(rhs.laser), enabled(rhs.enabled)
{
}

LaserActivateCommand::~LaserActivateCommand()
{
}

void LaserActivateCommand::Execute()
{
	if (laser)
	{
		if(enabled)
			laser->EnableLaser();
		else
			laser->DisableLaser();
	}
}

GameCommand* LaserActivateCommand::Clone() const
{
	return new LaserActivateCommand(*this);
}
